package br.com.equus.entidade;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.envers.Audited;

import br.com.arquitetura.entidade.Entidade;

@Entity
@Table(name = "EQ_CONTROLE_REPRODUCAO_M", catalog = "EQUUS")
@Audited
public class ControleReproducaoM extends Entidade<Integer> {

	private static final long serialVersionUID = 8322642525258663278L;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID_CONTROLE_REPROD_M", unique = true, nullable = false)
	private Integer id;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_ANIMAL", referencedColumnName = "ID_ANIMAL")
	private Animal animal;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DT_COLETA", nullable = false)
	private Date dtColeta;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_USUARIO", referencedColumnName = "ID_USUARIO", nullable = false)
	private Usuario usuario;

	@Column(name = "NUM_PALHETA", nullable = false)
	private Integer qtdPalheta;

	@Column(name = "COD_PALHETA", nullable = false)
	private String codigoPalheta;

	@Column(name = "NUM_MOTILIDADE_PROG")
	private Double motilidaPro;

	@Column(name = "NUM_MOT_PRO_CONGEL")
	private Double motilidaProCongelada;

	@Column(name = "NUM_CONC_ESPER", nullable = false)
	private Double concentracaoEsperma;

	@Column(name = "NUM_PALH_DOSE")
	private Double dosePalheta;

	@Column(name = "DSC_OBSERVACAO", columnDefinition = "text")
	private String observacao;

	@Transient
	private String dosePalhetaToString;

	@Transient
	private String motilidaProToString;

	@Transient
	private String motilidaProCongeladaToString;
	
	@Transient
	private String concentracaoEspermaToString;

	public ControleReproducaoM() {
	}

	public ControleReproducaoM(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Animal getAnimal() {
		return animal;
	}

	public void setAnimal(Animal animal) {
		this.animal = animal;
	}

	public Date getDtColeta() {
		return dtColeta;
	}

	public void setDtColeta(Date dtColeta) {
		this.dtColeta = dtColeta;
	}

	public String getObservacao() {
		return observacao;
	}

	public void setObservacao(String observacao) {
		this.observacao = observacao;
	}

	public Usuario getUsuario() {
		return usuario;
	}

	public void setUsuario(Usuario usuario) {
		this.usuario = usuario;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getCodigoPalheta() {
		return codigoPalheta;
	}

	public void setCodigoPalheta(String codigoPalheta) {
		this.codigoPalheta = codigoPalheta;
	}

	public Double getDosePalheta() {
		return dosePalheta;
	}

	public void setDosePalheta(Double dosePalheta) {
		this.dosePalheta = dosePalheta;
	}

	public String getDosePalhetaToString() {
		return dosePalhetaToString;
	}

	public void setDosePalhetaToString(String dosePalhetaToString) {
		this.dosePalhetaToString = dosePalhetaToString;
	}

	public Integer getQtdPalheta() {
		return qtdPalheta;
	}

	public void setQtdPalheta(Integer qtdPalheta) {
		this.qtdPalheta = qtdPalheta;
	}

	public Double getConcentracaoEsperma() {
		return concentracaoEsperma;
	}

	public void setConcentracaoEsperma(Double concentracaoEsperma) {
		this.concentracaoEsperma = concentracaoEsperma;
	}

	public Double getMotilidaPro() {
		return motilidaPro;
	}

	public void setMotilidaPro(Double motilidaPro) {
		this.motilidaPro = motilidaPro;
	}

	public String getMotilidaProToString() {
		return motilidaProToString;
	}

	public void setMotilidaProToString(String motilidaProToString) {
		this.motilidaProToString = motilidaProToString;
	}

	public Double getMotilidaProCongelada() {
		return motilidaProCongelada;
	}

	public void setMotilidaProCongelada(Double motilidaProCongelada) {
		this.motilidaProCongelada = motilidaProCongelada;
	}

	public String getMotilidaProCongeladaToString() {
		return motilidaProCongeladaToString;
	}

	public void setMotilidaProCongeladaToString(String motilidaProCongeladaToString) {
		this.motilidaProCongeladaToString = motilidaProCongeladaToString;
	}

	public String getConcentracaoEspermaToString() {
		return concentracaoEspermaToString;
	}

	public void setConcentracaoEspermaToString(String concentracaoEspermaToString) {
		this.concentracaoEspermaToString = concentracaoEspermaToString;
	}

}
